<template>
  <div class="playpage-disc">
    <div class="left">
      <img
        :src="
          currentSong.al
            ? currentSong.al.picUrl
            : currentSong.picUrl | completeImageUrl
        "
        :class="{ playing: playing }"
      />
    </div>

    <div class="right">
      <img
        :src="
          currentSong.al
            ? currentSong.al.picUrl
            : currentSong.picUrl | completeImageUrl
        "
        :class="{ playing: playing }"
      />
    </div>
  </div>
</template>

<script>
import { mapState } from "vuex";
export default {
  computed: mapState(["currentSong", "playing"]),
};
</script>

<style lang="less" scoped>
.playpage-disc {
  width: 100%;
  height: 740px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;

  .left {
    position: absolute;
    left: 30px;
    top: 110px;
    z-index: 1;

    img {
      width: 200px;
      border-radius: 10px;
      animation: rotate linear 10s infinite;
      animation-play-state: paused;
    }
  }

  .right {
    position: absolute;
    right: 20px;
    top: 100px;
    background-color: #b4b1a8;
    border-radius: 50%;
    width: 220px;
    height: 220px;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    img {
      width: 150px;
      border-radius: 50%;

      animation: rotate linear 10s infinite;
      animation-play-state: paused;

      &.playing {
        animation-play-state: running;
      }
    }
  }
}
</style>
